<?php
view_header('积分管理');
global $vue;
$url = '/point/admin/view-his?user_id=' . $user_id;

// 初始化Vue数据
$vue->data("height", "");
$vue->created(["load()",]);
$vue->method("load()", "
this.height = 'calc(100vh - " . get_config('admin_table_height') . "px)';
");

?>

<?php
$filter = [
    'data' => 'list',
    'url' => $url,
    'is_page' => true,
    'init' => true,
];
echo element("filter", $filter);
?>
<div class="mt-0">
    <h2 class="mb-3"><?=$name?></h2>
    <?php
    echo element('table', [
        ['name' => 'open', ':data' => 'list', ':height' => 'height'],
        [
            'name' => 'column',
            'prop' => 'title',
            'label' => lang('标题'),
            'width' => '',
        ],
        [
            'name' => 'column',
            'prop' => 'point',
            'label' => lang('积分'),
            'width' => '300',
        ],


        [
            'name' => 'column',
            'prop' => 'created_at_text',
            'label' => lang('时间'),
            'width' => '180',
        ],

        ['name' => 'close'],
    ]);
    ?>
</div>

<?php
echo element("pager", [
    'data' => 'list',
    'per_page' => get_config('per_page'),
    'per_page_name' => 'per_page',
    'url' => $url,
    'reload_data' => []
]);
?>


<?php view_footer(); ?>